#import "./board_epic.fragment.graphql"

query BoardEE(
  $fullPath: ID!
  $boardId: BoardID!
  $issueFilters: BoardIssueInput
  $isGroup: Boolean = false
  $isProject: Boolean = false
  $after: String
) {
  group(fullPath: $fullPath) @include(if: $isGroup) {
    id
    board(id: $boardId) {
      id
      epics(first: 10, issueFilters: $issueFilters, after: $after) {
        nodes {
          ...BoardEpicNode
          userPreferences {
            collapsed
          }
        }
        pageInfo {
          endCursor
          hasNextPage
        }
      }
    }
  }
  project(fullPath: $fullPath) @include(if: $isProject) {
    id
    board(id: $boardId) {
      id
      epics(first: 10, issueFilters: $issueFilters, after: $after) {
        nodes {
          ...BoardEpicNode
          userPreferences {
            collapsed
          }
        }
        pageInfo {
          endCursor
          hasNextPage
        }
      }
    }
  }
}
